﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;
using VIP.Data.Entities;
using VIP.Domain.VO;

namespace VIP.Domain
{
    public static class MappingExtentions
    {
        public static IServiceCollection AddMapping(this IServiceCollection services)
        {
            var config = new AutoMapper.MapperConfiguration(cfg => {
                cfg.CreateMap<Order, OrderVO>();
            });
            services.AddSingleton(sp => config.CreateMapper());
            return services;
        }
    }
}
